<?php

include_once ("../dao/userDAO.php");

function countNumOfUserByName($keyword) {
    return countByName($keyword);
}

function getUserBy($keyword, $start_position, $row_per_page) {
    return findBy($keyword, $start_position, $row_per_page);
}

function getUserById($insID) {
    return loadUserByID($insID);
}

function getUserByUsername($username){
    return loadUserByUsername($username);
}

function getUserByPassword($pass){
    return loadUserByPassword($pass);
}

function getUser($username, $pass){
    return loadUser($username, $pass);
}

function updateUser($userID, $name, $pass) {
    return update($userID, $name, $pass);
}

function updateUsernameOfUser($userID, $name){
    return updateUsername($userID, $name);
}

function updatePasswordOfUser($userID, $pass){
    return updatePassword($userID, $pass);
}

function addUser($name, $pass) {
    return insert($name, $pass);
}

function deleteUser($userID) {
    return delete($userID);
}

?>
